﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Linq.Expressions;

namespace Htse.Blue.Data
{
	public interface IRepository<T, K>
		where T : class
		where K : struct
	{
		IQueryable<T> GetAll();

		IQueryable<T> GetAll(Expression<Func<T, bool>> expression);

		T GetById(K id);

		T GetSingle(Expression<Func<T, bool>> expression);

		T Create(T entityToCreate);

		T SaveOrUpdate(T entityToSaveOrUpdate);

		void Delete(T entityToDelete);
	}
}
